package jsyf.oa.entity.system;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

@Entity
@Table(name = "T_SYS_COMPANY_STOCK", schema = "oa", catalog = "")
public class CompanyStockEntity extends BaseEntity implements Serializable {

    private String companyId;
    private String stockArea;
    private Integer sortNo;
    private String contactTel;//联系人电话
    private String contact;//联系人

    public String getContactTel() {
        return contactTel;
    }

    public void setContactTel(String contactTel) {
        this.contactTel = contactTel;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getStockArea() {
        return stockArea;
    }

    public void setStockArea(String stockArea) {
        this.stockArea = stockArea;
    }

    public Integer getSortNo() {
        return sortNo;
    }

    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject json = new JSONObject();
        json.put("ID", this.getId());
        json.put("COMPANY_ID", this.getCompanyId());
        json.put("STOCK_AREA", this.getStockArea());
        json.put("SORT_NO", this.getSortNo());
        json.put("CONTACT_TEL", this.getContactTel());
        json.put("CONTACT", this.getContact());
        return json;
    }

    @Override
    public String getTableName() {
        return "T_SYS_COMPANY_STOCK";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject json = new JSONObject();
        json.put("ID", "id");
        json.put("COMPANY_ID", "companyId");
        json.put("STOCK_AREA", "stockArea");
        json.put("CONTACT_TEL", "contactTel");
        json.put("CONTACT", "contact");
        json.put("SORT_NO", "sortNo");
        return json;
    }
}
